package com.example.operator;

public class OperatorDemo02 {
    public static void main(String[] args) {
        int a=10;
        a++;
        System.out.println(a);
        ++a;
        System.out.println(a);

        a--;
        System.out.println(a);
        --a;
        System.out.println(a);

        System.out.println("========");

        int b=10;
//        int rs=++b;
        int rs=b++;
        System.out.println(b);
        System.out.println(rs);

        System.out.println("========");

        int m=5; // 6 5 4
        int n=3; // 4 3
        int result=++m - m-- + --m - ++n + n-- +3;
        System.out.println(result); // 7
        System.out.println(m); // 4
        System.out.println(n); // 3

    }
}
